package com.example.headlines.fragment;


import android.widget.ImageView;


import android.view.View;

import android.widget.TextView;


import com.example.headlines.MainActivity;
import com.example.headlines.R;


import butterknife.BindView;
import butterknife.OnClick;


public class MyFragment extends BaseFragment {

    private TextView mname;

    @BindView(R.id.img_header)
    ImageView imgHeader;
    //        mname = (TextView) view.findViewById(Integer.parseInt(String.valueOf(R.id.mname)));
//        mname.setText(getStringFromSp("mname"));

    public MyFragment() {
    }
    public static MyFragment newInstance() {

        MyFragment fragment = new MyFragment();
        return fragment;
    }

    @Override
    protected int initLayout() {
        return R.layout.fragment_my;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {

    }

    @OnClick({R.id.img_header, R.id.rl_collect, R.id.rl_skin, R.id.rl_logout,R.id.mname})
    public void onViewClicked(View view) {
        switch (view.getId()) {

            case R.id.img_header:
                break;
            case R.id.rl_collect:
                break;
            case R.id.rl_skin:
                break;
            case R.id.rl_logout:
                showToast("退出登录");
                saveStringToSp("token", null);
                navigateTo(MainActivity.class);
                break;
        }
    }
}